function [adata_file,mouse_id,userID]=find_adata_file(ExpID,adata_dir)
% finds the adata file corresponding to ExpID in the folder adata_dir


users=dir(adata_dir);
for ind=3:length(users)
    curr_animals=dir([adata_dir '\' users(ind).name]);
    for knd=3:length(curr_animals)
        curr_files=dir([adata_dir '\' users(ind).name '\' curr_animals(knd).name '\*']);
        for mnd=1:length(curr_files)
            if strcmp(curr_files(mnd).name(findstr(curr_files(mnd).name,'T')+1:end-4),num2str(ExpID))
                adata_file=curr_files(mnd).name;
                userID=users(ind).name;
                mouse_id=curr_animals(knd).name;
                break;
            end
        end
    end
end

if ~exist('adata_file','var');
    adata_file='';
    mouse_id='';
    userID='';
end
